clone-section from to except-defaults except-instruments
This enables to clone a section into another section while introducing changes to the instrument classes. The following clones section a to section b as-is, except that the tonality and velocity in the section b will get new default values for all instruments, and synth's symbol class will get a new value, and cello's length will get a new value.
(clone-section a b
except
tonality (activate-tonality (major c 4))
velocity '(54 55 55)
synth
symbol '(a b c)
cello
length '(1/16 1/16.)
)
Except accepts any classes to be redefined, and all the instruments too. Instrument name can be a larger chunk, and the definitions will be inherited for all its instruments. The target section can also be a single section or a hypersection, in which case all the target sections will receive these new values. Notice how below all controllers of section a are changed, and that synth-group controllers are an exception.
How to clone a section to another and turn all classes around?
(def-section sect-a
synth1
symbol '(a b c)
zone '(2/1 1/1)
tonality (activate-tonality (major c 4) (major c 6))
length '((1/8 1/16) (1/4 1/4))
velocity '(64)
synth2
symbol '(aa bb cc)
zone '(22/1 11/1)
tonality (activate-tonality (major c 4) (major c 6))
length '((11/8 11/16) (11/4 11/4))
velocity '(14)
)
To make global processes all classes you must define each class separately. Here you see how tonality, symbol, lenght, velocity and durations are processed.
Notice the difference between do-section and doing the operation directly to same-as.
1. If you have zone lists then do-section turns each zone contents around.
(clone-section sect-a sect-b
except
tonality (reverse (same-as sect-a))
symbol (do-section :all '(symbol-retrograde x) (same-as sect-a))
So, why to use do-section when you could use a function directly to the same-as? This is because do-section enables to target the operation to a given range, and it also ensures that if the class contains zoned list that all them are processed.
If you have zone lists and want to turn both their zone values and the whole zones around use